package com.panda.system.dto;

public class TaskFpDto {
    private Long userId;
    private int taskCount;

    public TaskFpDto(){

    }

    public TaskFpDto(Long userId,int taskCount){
        this.userId = userId;
        this.taskCount = taskCount;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public int getTaskCount() {
        return taskCount;
    }

    public void setTaskCount(int taskCount) {
        this.taskCount = taskCount;
    }

    // 正序
    public static int compare(TaskFpDto s1,TaskFpDto s2) {
        int age1 = s1.getTaskCount();
        int age2 = s2.getTaskCount();
        if(age1>age2){
            return 1;
        }
        return -1;
    }

    // 倒序
    public static int compareDesc(TaskFpDto s1,TaskFpDto s2) {
        int age1 = s1.getTaskCount();
        int age2 = s2.getTaskCount();
        if(age1<age2){
            return 1;
        }
        return -1;
    }
}
